﻿USE [master]
GO
/****** Object:  Database [IMAGE]    Script Date: 2024-04-24 14:44:00 ******/
CREATE DATABASE [IMAGE]
 CONTAINMENT = NONE
 ON  PRIMARY 
( NAME = N'IMAGE', FILENAME = N'd:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\DATA\IMAGE.mdf' , SIZE = 8192KB , MAXSIZE = UNLIMITED, FILEGROWTH = 65536KB )
 LOG ON 
( NAME = N'IMAGE_log', FILENAME = N'd:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\DATA\IMAGE_log.ldf' , SIZE = 8192KB , MAXSIZE = 2048GB , FILEGROWTH = 65536KB )
 WITH CATALOG_COLLATION = DATABASE_DEFAULT, LEDGER = OFF
GO
ALTER DATABASE [IMAGE] SET COMPATIBILITY_LEVEL = 160
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [IMAGE].[dbo].[sp_fulltext_database] @action = 'enable'
end
GO
ALTER DATABASE [IMAGE] SET ANSI_NULL_DEFAULT OFF 
GO
ALTER DATABASE [IMAGE] SET ANSI_NULLS OFF 
GO
ALTER DATABASE [IMAGE] SET ANSI_PADDING OFF 
GO
ALTER DATABASE [IMAGE] SET ANSI_WARNINGS OFF 
GO
ALTER DATABASE [IMAGE] SET ARITHABORT OFF 
GO
ALTER DATABASE [IMAGE] SET AUTO_CLOSE OFF 
GO
ALTER DATABASE [IMAGE] SET AUTO_SHRINK OFF 
GO
ALTER DATABASE [IMAGE] SET AUTO_UPDATE_STATISTICS ON 
GO
ALTER DATABASE [IMAGE] SET CURSOR_CLOSE_ON_COMMIT OFF 
GO
ALTER DATABASE [IMAGE] SET CURSOR_DEFAULT  GLOBAL 
GO
ALTER DATABASE [IMAGE] SET CONCAT_NULL_YIELDS_NULL OFF 
GO
ALTER DATABASE [IMAGE] SET NUMERIC_ROUNDABORT OFF 
GO
ALTER DATABASE [IMAGE] SET QUOTED_IDENTIFIER OFF 
GO
ALTER DATABASE [IMAGE] SET RECURSIVE_TRIGGERS OFF 
GO
ALTER DATABASE [IMAGE] SET  DISABLE_BROKER 
GO
ALTER DATABASE [IMAGE] SET AUTO_UPDATE_STATISTICS_ASYNC OFF 
GO
ALTER DATABASE [IMAGE] SET DATE_CORRELATION_OPTIMIZATION OFF 
GO
ALTER DATABASE [IMAGE] SET TRUSTWORTHY OFF 
GO
ALTER DATABASE [IMAGE] SET ALLOW_SNAPSHOT_ISOLATION OFF 
GO
ALTER DATABASE [IMAGE] SET PARAMETERIZATION SIMPLE 
GO
ALTER DATABASE [IMAGE] SET READ_COMMITTED_SNAPSHOT ON 
GO
ALTER DATABASE [IMAGE] SET HONOR_BROKER_PRIORITY OFF 
GO
ALTER DATABASE [IMAGE] SET RECOVERY FULL 
GO
ALTER DATABASE [IMAGE] SET  MULTI_USER 
GO
ALTER DATABASE [IMAGE] SET PAGE_VERIFY CHECKSUM  
GO
ALTER DATABASE [IMAGE] SET DB_CHAINING OFF 
GO
ALTER DATABASE [IMAGE] SET FILESTREAM( NON_TRANSACTED_ACCESS = OFF ) 
GO
ALTER DATABASE [IMAGE] SET TARGET_RECOVERY_TIME = 60 SECONDS 
GO
ALTER DATABASE [IMAGE] SET DELAYED_DURABILITY = DISABLED 
GO
ALTER DATABASE [IMAGE] SET ACCELERATED_DATABASE_RECOVERY = OFF  
GO
EXEC sys.sp_db_vardecimal_storage_format N'IMAGE', N'ON'
GO
ALTER DATABASE [IMAGE] SET QUERY_STORE = ON
GO
ALTER DATABASE [IMAGE] SET QUERY_STORE (OPERATION_MODE = READ_WRITE, CLEANUP_POLICY = (STALE_QUERY_THRESHOLD_DAYS = 30), DATA_FLUSH_INTERVAL_SECONDS = 900, INTERVAL_LENGTH_MINUTES = 60, MAX_STORAGE_SIZE_MB = 1000, QUERY_CAPTURE_MODE = AUTO, SIZE_BASED_CLEANUP_MODE = AUTO, MAX_PLANS_PER_QUERY = 200, WAIT_STATS_CAPTURE_MODE = ON)
GO
USE [IMAGE]
GO
/****** Object:  Table [dbo].[T_DOWNLOADHISTORY]    Script Date: 2024-04-24 14:44:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_DOWNLOADHISTORY](
	[PK] [varchar](20) NOT NULL,
	[CREATEDATE] [varchar](20) NULL,
	[CREATOR] [varchar](20) NULL,
	[MODIFYDATE] [varchar](20) NULL,
	[MODIFIER] [varchar](20) NULL,
	[DELETEUSER] [varchar](20) NULL,
	[DELETEDATE] [varchar](20) NULL,
	[DEL] [char](1) NULL,
	[FLAG] [int] NULL,
	[IMAGE] [varchar](20) NULL,
	[PAY] [int] NULL,
 CONSTRAINT [PK_T_DOWNLOADHISTORY] PRIMARY KEY CLUSTERED 
(
	[PK] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[T_IMAGE]    Script Date: 2024-04-24 14:44:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_IMAGE](
	[PK] [varchar](20) NOT NULL,
	[CREATEDATE] [varchar](20) NULL,
	[CREATOR] [varchar](20) NULL,
	[MODIFYDATE] [varchar](20) NULL,
	[MODIFIER] [varchar](20) NULL,
	[DELETEUSER] [varchar](20) NULL,
	[DELETEDATE] [varchar](20) NULL,
	[DEL] [char](1) NULL,
	[FLAG] [int] NULL,
	[IMAGECODE] [varchar](50) NULL,
	[IMAGENAME] [varchar](50) NULL,
	[SERIES] [varchar](20) NULL,
	[NOTE] [varchar](32) NULL,
	[PRICE] [int] NULL,
	[ORIGIMGPATH] [varchar](500) NULL,
	[FILETYPE] [varchar](50) NULL,
	[SIZE] [int] NULL,
	[DAYPATH] [varchar](50) NULL,
	[PUBLISH] [char](1) NULL,
	[STYLE] [varchar](50) NULL,
	[AUTHOR] [varchar](50) NULL,
	[HEAT] [int] NULL,
	[SERIESNAME] [varchar](500) NULL,
 CONSTRAINT [PK_T_IMAGE] PRIMARY KEY CLUSTERED 
(
	[PK] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[T_MOD]    Script Date: 2024-04-24 14:44:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_MOD](
	[PK] [varchar](20) NOT NULL,
	[CREATEDATE] [varchar](20) NULL,
	[CREATOR] [varchar](20) NULL,
	[MODIFYDATE] [varchar](20) NULL,
	[MODIFIER] [varchar](20) NULL,
	[DELETEUSER] [varchar](20) NULL,
	[DELETEDATE] [varchar](20) NULL,
	[DEL] [char](1) NULL,
	[FLAG] [int] NULL,
	[MODCODE] [varchar](50) NULL,
	[MODNAME] [varchar](50) NULL,
	[ACCESSMODE] [int] NULL,
 CONSTRAINT [PK_T_MOD] PRIMARY KEY CLUSTERED 
(
	[PK] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[T_SERIES]    Script Date: 2024-04-24 14:44:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_SERIES](
	[PK] [varchar](20) NOT NULL,
	[CREATEDATE] [varchar](20) NULL,
	[CREATOR] [varchar](20) NULL,
	[MODIFYDATE] [varchar](20) NULL,
	[MODIFIER] [varchar](20) NULL,
	[DELETEUSER] [varchar](20) NULL,
	[DELETEDATE] [varchar](20) NULL,
	[DEL] [char](1) NULL,
	[FLAG] [int] NULL,
	[SERIESNAME] [varchar](200) NULL,
	[DISABLE] [char](1) NULL,
 CONSTRAINT [PK_T_CATEGORY] PRIMARY KEY CLUSTERED 
(
	[PK] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[T_USER]    Script Date: 2024-04-24 14:44:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_USER](
	[PK] [varchar](20) NOT NULL,
	[CREATEDATE] [varchar](20) NULL,
	[CREATOR] [varchar](20) NULL,
	[MODIFYDATE] [varchar](20) NULL,
	[MODIFIER] [varchar](20) NULL,
	[DELETEUSER] [varchar](20) NULL,
	[DELETEDATE] [varchar](20) NULL,
	[DEL] [char](1) NULL,
	[FLAG] [int] NULL,
	[USERCODE] [varchar](50) NULL,
	[USERNAME] [varchar](50) NULL,
	[AVALIABLE] [char](1) NULL,
	[PASSWORD] [varchar](32) NULL,
 CONSTRAINT [PK_T_USER] PRIMARY KEY CLUSTERED 
(
	[PK] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[T_USERRIGHT]    Script Date: 2024-04-24 14:44:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_USERRIGHT](
	[PK] [varchar](20) NOT NULL,
	[CREATEDATE] [varchar](20) NULL,
	[CREATOR] [varchar](20) NULL,
	[MODIFYDATE] [varchar](20) NULL,
	[MODIFIER] [varchar](20) NULL,
	[DELETEUSER] [varchar](20) NULL,
	[DELETEDATE] [varchar](20) NULL,
	[DEL] [char](1) NULL,
	[FLAG] [int] NULL,
	[MOD] [varchar](20) NULL,
	[USERID] [varchar](20) NULL,
	[READ] [char](1) NULL,
	[WRITE] [char](1) NULL,
	[REMOVE] [char](1) NULL,
	[APPROVE] [char](1) NULL,
 CONSTRAINT [PK_T_USERRIGHT] PRIMARY KEY CLUSTERED 
(
	[PK] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
USE [master]
GO
ALTER DATABASE [IMAGE] SET  READ_WRITE 
GO
